﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using CDB.LinqModel.Data;

namespace CDB.LinqModel
{
    public partial class Blog
    {
        #region Variable Declaration
        private IDataRepository _dataObject;
        #endregion

        public Blog(IDataRepository dataObject)
            : this()
        {
            _dataObject = dataObject;
        }
        public void Create()
        {
            _dataObject.CreateBlog(this);
        }
        public void Update()
        {
            _dataObject.UpdateBlog(this);
        }
        public void Delete()
        {
            _dataObject.DeleteBlog(this);
        }
        public List<Blog> GetAllBlogs()
        {
            return _dataObject.GetAllBlogs();
        }
        public void GetBlogById()
        {
            _dataObject.GetBlogById(this);
        }
        public void GetContentByBlogName()
        {
            _dataObject.GetContentByBlogName(this);
        }
    }
}
